<template>
  <el-row style="margin: auto;width: 900px;height: 300px">
    <el-col :span="6" v-for="(item,index) in tableData" :key="index" style="margin: 5px">
      <el-card>
        <el-row>
          <span>{{item.name}}</span>
        </el-row>
        <div style="padding: 14px;">
          <el-image
              style="width: 100px; height: 100px; margin-bottom:-4px"
              :src="`/api/common/download?name=${item.img}`"
          ></el-image>
        </div>
      </el-card>
      <el-row>
        <template v-for="(value,index) in operator">
          <el-button type="text"   @click="value.click(scope.row, value)" :key="index">
            {{ value.text }}
          </el-button>
        </template>
      </el-row>
    </el-col>
  </el-row>
</template>

<script>
export default {
  props:{
    tableData:{},
    tableHeadData:{},
    operator:{},
    page:{},
    pageSize:{},
    counts:{},
    multipleTable:{},
    delButton:false,
  },
  computed:{
    currentPage: {
      get () {
        return this.page
      },
      set (val) {
        this.$emit('update:page', val)
      }
    },
    limit: {
      get () {
        return this.pageSize
      },
      set (val) {
        this.$emit('update:pageSize', val)
      }
    },
    multiple: {
      get () {
        return this.multipleTable
      },
      set (val) {
        this.$emit('update:multipleTable', val)
      }
    }
  },
  data(){
    return{

    }
  },
  methods:{
    handleSelectionChange (selection) {
      this.$emit('handleSelectionChangeA', selection)
    },
    toggleSelection (selection) {
      this.$emit('toggleSelectionA', selection)
    },
    deleteSelection (selection) {
      this.$emit('deleteSelectionA', selection)
    },
    handleSizeChange (selection) {
      this.$emit('handleSizeChangeA', selection)
    },
    handleCurrentChange (selection) {
      this.$emit('handleCurrentChangeA', selection)
    },
    statusFormat(row,column,item) {
      // console.log(row.radio)
      // console.log(row[column.property])
      // console.log(column)
      // console.log(row)
      const site = row[column.property]
      console.log(123123)
      const  label = item;
      const reg = /(?<=\().*(?=\))/g;
      const found = label.match(reg);
      //
      // console.log(found)

      const words = found[0].split(',');
      // console.log(words)
      return words[site].split(':')[1]
      // return words[row[column.property]]
    },
    labelFormat(label){
      const reg = /^((?!\(.*\)).)*/;
      return label.match(reg)[0]
    }
  }
}
</script>

<style scoped>

</style>